diff --git a/django/core/handlers/asgi.py b/django/core/handlers/asgi.py
index 846bece39b..a9e26ab657 100644
--- a/django/core/handlers/asgi.py
+++ b/django/core/handlers/asgi.py
@@ -41,21 +41,13 @@ class ASGIRequest(HttpRequest):
         self._post_parse_error = False
         self._read_started = False
         self.resolver_match = None
-        self.script_name = self.scope.get("root_path", "")
-        if self.script_name:
-            # TODO: Better is-prefix checking, slash handling?
-            self.path_info = scope["path"].removeprefix(self.script_name)
-        else:
-            self.path_info = scope["path"]
-        # The Django path is different from ASGI scope path args, it should
-        # combine with script name.
-        if self.script_name:
-            self.path = "%s/%s" % (
-                self.script_name.rstrip("/"),
-                self.path_info.replace("/", "", 1),
-            )
-        else:
-            self.path = scope["path"]
+        self.script_name = settings.FORCE_SCRIPT_NAME or self.scope.get("root_path", "")
+        self.path_info = (
+            scope["path"].removeprefix(self.script_name)
+            if self.script_name
+            else scope["path"]
+        )
+        self.path = self.script_name + self.path_info
         # HTTP basics.
         self.method = self.scope["method"].upper()
         # Ensure query string is encoded correctly.
